<?php

declare(strict_types=1);

namespace sheep\library\uploader\driver;

use League\Flysystem\FilesystemAdapter;
use Overtrue\Flysystem\Qiniu\QiniuAdapter;
use think\filesystem\Driver;

class Qiniu extends Driver
{
    protected function createAdapter(): FilesystemAdapter
    {
        $qiniu = new QiniuAdapter(
            $this->config['accessKey'],
            $this->config['secretKey'],
            $this->config['bucket'],
            $this->config['url']
        );

        return $qiniu;
    }
}
